package p.ithorns.sample.moudle2;

import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

/**
 * ModuleServletConfig
 *
 * https://stackoverflow.com/questions/30670327/spring-boot-with-multiple-dispatcherservlet-each-having-their-own-controllers
 *
 * @author ithorns
 * @version 1.0.0
 * @date 2021/10/26 15:02
 */
@Import({ModuleServletRegistrar.class})
@Configuration
public class MultiModuleConfig implements WebMvcRegistrations {

    @Override
    public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
        return new ModulePathHandlerMapping();
    }

}